<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link rel="stylesheet" href="../../../../src/css/common/reset.css">
    <link rel="stylesheet" href="com-page.css">

    <script src="../../lib/jquery.js"></script>
    <!--<script src="com-page.js"></script>-->
    <script src="com-page.js"></script>
</head>
<body>

<div class="demo clearfix">

    <!--<section class="com-page">
        <a data-name="pageBtn" class="page-btn">上一页</a>
        <ul class="page-item">
            <li data-name="num" class="item-num active"></li>
            <li data-name="more" class="item-more">
                <i></i><i></i><i></i>
            </li>
            <li data-name="num" class="item-num"></li>
            <li data-name="num" class="item-num"></li>
            <li data-name="num" class="item-num"></li>
            <li data-name="num" class="item-num"></li>
            <li data-name="num" class="item-num"></li>
            <li data-name="more" class="item-more">
                <i></i><i></i><i></i>
            </li>
            <li data-name="num" class="item-num"></li>
        </ul>
        <a data-name="pageBtn" class="page-btn">下一页</a>
    </section>-->
    <div id="page-box">

    </div>
<span>454564</span>
</div>

<script>

    /**
     * @total:总条数
     * @pages:一页多少条
     * @beforeText:上一页文字
     * @afterText:下一页文字
     * @callback:参数Num为当前页数
     * @实例方法setPage(a,b,c) 【总数、每页数、跳转到固定页(默认为未渲染之前的页码)】
     * @author:vane for 2018/09/23
     **/
    var obj = $('#page-box').comPage({
        total:160,
        pages:10,
        callback:function(num){
            console.log(num)
        }
    });

    setTimeout(function(){
        obj.setPage(80,10)
    },3000)


</script>
</body>
</html>